package com.wontube.smr.client.youtube;

import java.util.List;

import com.wontube.client.modle.vo.PagenateInfo;
import com.wontube.smr.client.model.po.Genre;
import com.wontube.smr.client.model.vo.MovieItems;


/**
 * youtube 短片video搜索接口
 * 请求参数的合法值参见类 smr.client.constants.YoutubeFeedConstants
 * @author tanggf(2012-4-11) 
 *
 */
public interface IYoutubeFeedHandler {
	//feed id
	/** 观看最多 */
	final String STANDARD_FEED_MOST_VIEWED = "most_viewed";
	/** 最受欢迎 */
	final String STANDARD_FEED_MOST_POPULAR = "most_popular";
	/** 评分最高 */
	final String STANDARD_FEED_TOP_RATED = "top_rated";
	/** 收藏最多 */
	final String STANDARD_FEED_TOP_FAVORITES = "top_favorites";
	/** 最近上传 */
	final String STANDARD_FEED_MOST_RECENT = "most_recent";
	/** 讨论最多 */
	final String STANDARD_FEED_MOST_DISCUSSED = "most_discussed";
	/** 回复最多 */
	final String STANDARD_FEED_MOST_RESPONDED = "most_responded";
	/** 近期精选 */
	final String STANDARD_FEED_MOST_FEATURED = "recently_featured";
	/** 手机视频 */
	final String STANDARD_FEED_WATCH_ON_MOBILE = "watch_on_mobile";
	
	/** 全部合法feedid */
	final String[] ALL_FEED_IDS = new String[]{
			STANDARD_FEED_MOST_VIEWED, STANDARD_FEED_MOST_POPULAR, 
			STANDARD_FEED_TOP_RATED, STANDARD_FEED_TOP_FAVORITES,
			STANDARD_FEED_MOST_RECENT, STANDARD_FEED_MOST_DISCUSSED,
			STANDARD_FEED_MOST_RESPONDED, STANDARD_FEED_MOST_FEATURED,
			STANDARD_FEED_WATCH_ON_MOBILE
	};
	
	//时间参数
	final String TIME_TODAY = "today";
	final String TIME_THIS_WEEK = "this_week";
	final String TIME_THIS_MONTH = "this_month";
	final String TIME_ALL = "all_time";
	
	//全部合法的时间参数(默认all_time)
	final String[] ALL_TIMES = new String[]{
			TIME_TODAY, TIME_THIS_WEEK, TIME_THIS_MONTH, TIME_ALL
	};
	
	//视频分类
	final String CATEGORY_AUTOS = "Autos";
	final String CATEGORY_COMEDY = "Comedy";
	final String CATEGORY_ENTERTAINMENT= "Entertainment";
	final String CATEGORY_FILM = "Film";
	final String CATEGORY_GAMING = "Gaming";
	final String CATEGORY_HOWTO = "Howto";
	final String CATEGORY_NONPROFITS= "Nonprofits";
	final String CATEGORY_PEOPLE = "People";
	final String CATEGORY_PETS = "Pets";
	final String CATEGORY_SCIENCE = "Science";
	final String CATEGORY_TRAVEL = "Travel";
	
	//全部合法的分类
	final String[] ALL_CATEGORIES = new String[]{
			CATEGORY_AUTOS, CATEGORY_COMEDY, CATEGORY_ENTERTAINMENT,
			CATEGORY_FILM, CATEGORY_GAMING, CATEGORY_HOWTO,
			CATEGORY_NONPROFITS, CATEGORY_PEOPLE, CATEGORY_PETS,
			CATEGORY_SCIENCE, CATEGORY_TRAVEL
	};
	
	/**
	 * 根据feedId, 搜索视频短片
	 * @param feedId 参考类常量
	 * @return
	 */
	MovieItems listStandarFeeds(String feedId, PagenateInfo pageInfo);
	
	/**
	 * 根据feedId, time 搜索视频短片
	 * @param feedId 参考类常量
	 * @param time 参考类常量
	 * @param pageInfo
	 * @return
	 */
	MovieItems listStandarFeeds(String feedId, String time, PagenateInfo pageInfo);
	
	/**
	 * 根据feedId, category 搜索视频短片
	 * @param feedId	 参考类常量
	 * @param category 参考类常量
	 * @param pageInfo
	 * @return
	 */
	MovieItems listStandarFeedsWithCategory(String feedId, String category, PagenateInfo pageInfo);
	
	/**
	 * 根据feedId, time, category 搜索视频短片
	 * @param feedId 参考类常量
	 * @param time 参考类常量
	 * @param category 参考类常量
	 * @param pageInfo
	 * @return
	 */
	MovieItems listStandarFeeds(String feedId, String time, String category, PagenateInfo pageInfo);
	
	/**
	 * 直接从搜索video短片
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchVideos(PagenateInfo pageInfo);
		
	/**
	 * 根据关键字搜索video短片	
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchVideos(String query, PagenateInfo pageInfo);
	
	/**
	 * 根据关键字, 分类搜索video短片
	 * @param query 搜索关键字
	 * @param category 参考类常量
	 * @param pageInfo
	 * @return
	 */
	MovieItems searchVideos(String query, String category, PagenateInfo pageInfo);
	
	/**
	 * 全部分类
	 * @return
	 */
	List<Genre> listAllGenres();
}
